Return MLS public keys as part of getting a 1:1 conversation#4224
Merged
akshaymankar merged 34 commits intodevelopfrom Sep 9, 2024
Merged
Return MLS public keys as part of getting a 1:1 conversation#4224akshaymankar merged 34 commits intodevelopfrom
akshaymankar merged 34 commits intodevelopfrom
Conversation
…s for getting one2one conversation
Also add a test where local client is removed and the proposal is sent to remote clients
Pending: keys for dynamic backends when running in K8s
… group instead of the conversation This encodes the assumption that the creator's backend always owns the conversation. For one2one conversations, this would break, however we should use a different function to do this setup as the keys are supposed to be returned in getMLSOne2OneConversation endpoint from version 6 onwards.
Also add a test to ensure that proposals for removing clients can be verified.
b3ebef2 to
106a827
Compare
They were hardcoded to use the dev API version, which is incorrect
Make it so it doesn't fail for adding new API versions
7f78079 to
0da9ad8
Compare
0da9ad8 to
50413ad
Compare
50413ad to
dfef1a2
Compare
…ing to older backends
It is necessary in older API versions, got removed as a bug.
… 'RemoteConversation' Federation API V1 expects JSON serialization similar to Client API V5.
…ration tests It required changes due to change in federation API
…s federation API v2
dfef1a2 to
1154b19
Compare
These were likely generated after refactoring so we actually did break the API (in a small way). This is verified by seeing the results from q1-2024 release, APIs <= V5 return `epoch_timestamp` as `null` instead of omitting it.
228b952 to
67e0e57
Compare
Client API v4 doesn't support this endpoint
5c5efc1 to
a531068
Compare
a531068 to
e4c52e5
Compare
akshaymankar
approved these changes
Sep 9, 2024
stefanwire
added a commit
that referenced
this pull request
Sep 12, 2024
…on (#4224)" (#4237) * Routes.Public.Galley.Conversation: Remove version overlap in endpionts for getting one2one conversation * integration: Verify remove propsals from the backend in group convos Also add a test where local client is removed and the proposal is sent to remote clients * integration-tests: Use separate mls private keys for each env Pending: keys for dynamic backends when running in K8s * integration: resetClientGroup: Use MLS public keys for creator of the group instead of the conversation This encodes the assumption that the creator's backend always owns the conversation. For one2one conversations, this would break, however we should use a different function to do this setup as the keys are supposed to be returned in getMLSOne2OneConversation endpoint from version 6 onwards. * integration: Add tests for how the new API is supposed to work Also add a test to ensure that proposals for removing clients can be verified. * wire-api{,-federation}: Add new APIs for returning MLS public keys for 1:1 convs * galley: Implement new APIs for returning MLS public keys when getting 1:1 convs * integration: Adjust one2one conv tests to use the new API * galley.integration.yaml: fix path of the backend's public keys * add golden tests * charts/integration: Add mls private keys for dynamic backends * integration: Fix API versions to be used for fed-v0 and v1 envs They were hardcoded to use the dev API version, which is incorrect * BackendNotificationPusherSpec: Fix API version test Make it so it doesn't fail for adding new API versions * hack/bin/gen-certs.sh: Also gen certs for federation-v1 * integration: Describe how one2one conversations should work when talking to older backends * integration/SetupHelpers: Slightly nicer way to detect backend API version * wire-api: Add epoch_timestamp to serialization of conv Protocol It is necessary in older API versions, got removed as a bug. * federation-api-galley: Use Protocol from client API V5 when returning 'RemoteConversation' Federation API V1 expects JSON serialization similar to Client API V5. * galley-integration: Delete test which is already covered by new integration tests It required changes due to change in federation API * galley: Only allow getting remote MLS 1:1 convs if the remote supports federation API v2 * galley: Do not return 1:1 conversations in federation API V1 * galley: Add query param for public key format to "get-one-to-one-mls-conversation" * wire-api: Fix golden test JSONs These were likely generated after refactoring so we actually did break the API (in a small way). This is verified by seeing the results from q1-2024 release, APIs <= V5 return `epoch_timestamp` as `null` instead of omitting it. * MLSOne2OneConversation: Add dynamic param to swagger name * galley: Log warning when getting One2One conv and remote doesn't have MLS enabled * wire-api-federation: Fix wrongly generated golden test * integration/testSupportedProtocols: Don't run for federation-v0 Client API v4 doesn't support this endpoint * galley: Move JWK key format to client APIv7 --------- Co-authored-by: Akshay Mankar <akshay@wire.com>
stefanwire
added a commit
that referenced
this pull request
Sep 12, 2024
…on (#4224)" (#4237) * Routes.Public.Galley.Conversation: Remove version overlap in endpionts for getting one2one conversation * integration: Verify remove propsals from the backend in group convos Also add a test where local client is removed and the proposal is sent to remote clients * integration-tests: Use separate mls private keys for each env Pending: keys for dynamic backends when running in K8s * integration: resetClientGroup: Use MLS public keys for creator of the group instead of the conversation This encodes the assumption that the creator's backend always owns the conversation. For one2one conversations, this would break, however we should use a different function to do this setup as the keys are supposed to be returned in getMLSOne2OneConversation endpoint from version 6 onwards. * integration: Add tests for how the new API is supposed to work Also add a test to ensure that proposals for removing clients can be verified. * wire-api{,-federation}: Add new APIs for returning MLS public keys for 1:1 convs * galley: Implement new APIs for returning MLS public keys when getting 1:1 convs * integration: Adjust one2one conv tests to use the new API * galley.integration.yaml: fix path of the backend's public keys * add golden tests * charts/integration: Add mls private keys for dynamic backends * integration: Fix API versions to be used for fed-v0 and v1 envs They were hardcoded to use the dev API version, which is incorrect * BackendNotificationPusherSpec: Fix API version test Make it so it doesn't fail for adding new API versions * hack/bin/gen-certs.sh: Also gen certs for federation-v1 * integration: Describe how one2one conversations should work when talking to older backends * integration/SetupHelpers: Slightly nicer way to detect backend API version * wire-api: Add epoch_timestamp to serialization of conv Protocol It is necessary in older API versions, got removed as a bug. * federation-api-galley: Use Protocol from client API V5 when returning 'RemoteConversation' Federation API V1 expects JSON serialization similar to Client API V5. * galley-integration: Delete test which is already covered by new integration tests It required changes due to change in federation API * galley: Only allow getting remote MLS 1:1 convs if the remote supports federation API v2 * galley: Do not return 1:1 conversations in federation API V1 * galley: Add query param for public key format to "get-one-to-one-mls-conversation" * wire-api: Fix golden test JSONs These were likely generated after refactoring so we actually did break the API (in a small way). This is verified by seeing the results from q1-2024 release, APIs <= V5 return `epoch_timestamp` as `null` instead of omitting it. * MLSOne2OneConversation: Add dynamic param to swagger name * galley: Log warning when getting One2One conv and remote doesn't have MLS enabled * wire-api-federation: Fix wrongly generated golden test * integration/testSupportedProtocols: Don't run for federation-v0 Client API v4 doesn't support this endpoint * galley: Move JWK key format to client APIv7 --------- Co-authored-by: Akshay Mankar <akshay@wire.com>
This was referenced Oct 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
changelog.d